import { initUrl } from '@/config/axios_config'

/******************菜单API******************** */
///rest/menu/menuTreeListByRoleId 获取角色的菜单列表
export const getMenuTreeListByRoleId = data => initUrl(`/rest/menu/menuTreeListByRoleId`, data, 'GET')

///rest/menu/listTree 获取菜单列表（树形）
export const getMenuTreeList = data => initUrl(`/rest/menu/list`, data, 'GET')

///rest/menu/selectMenuTreeList 获取菜单列表(选择父级菜单用)
export const getSelectMenuTreeList = data => initUrl(`/rest/menu/selectMenuTreeList`, data, 'GET')

///rest/menu/getMenuInfo 获取菜单信息
export const getMenuInfo = data => initUrl(`/rest/menu/getMenuInfo`, data, 'GET')

///rest/menu/add 菜单新增
export const addMenu = data => initUrl(`/rest/menu/add`, data, 'POST')

///rest/menu/edit 菜单修改
export const editMenu = data => initUrl(`/rest/menu/edit`, data, 'POST')

///rest/menu/remove 删除菜单
export const deleteMenu = data => initUrl(`/rest/menu/remove`, data, 'GET')
